var php = false;
var html5 = false;
var css = false;
var linux = false;
var bootstrap = false;
var js = false;
var laravel = false;
var apache = false;
var phps = 0;
var html5s = 0;
var csss = 0;
var linuxs = 0;
var bootstraps = 0;
var jss = 0;
var laravels = 0;
var apaches = 0;

$('.php').click(function(){
	if (php == false) {
		$(this).css('opacity','0.3');
		php = true;
		phps = 1;
		$('.w_1').text('已关注');
	}else {
		$(this).css('opacity','1');
		php = false;
		phps = 0;
		$('.w_1').text('关注');
	}
})

$('.html5').click(function(){
	if (html5 == false) {
		$(this).css('opacity','0.3');
		html5 = true;
		html5s = 2;
		$('.w_2').text('已关注');
	}else {
		$(this).css('opacity','1');
		html5 = false;
		html5s = 0;
		$('.w_2').text('关注');
	}
})

$('.js').click(function(){
	if (js == false) {
		$(this).css('opacity','0.3');
		js = true;
		jss = 3;
		$('.w_3').text('已关注');
	}else {
		$(this).css('opacity','1');
		js = false;
		jss = 0;
		$('.w_3').text('关注');
	}
})

$('.apache').click(function(){
	if (apache == false) {
		$(this).css('opacity','0.3');
		apache = true;
		apaches = 4;
		$('.w_4').text('已关注');
	}else {
		$(this).css('opacity','1');
		apache = false;
		apaches =0;
		$('.w_4').text('关注');
	}
})

$('.linux').click(function(){
	if (linux == false) {
		$(this).css('opacity','0.3');
		linux = true;
		linuxs = 5
		$('.w_5').text('已关注');
	}else {
		$(this).css('opacity','1');
		linux = false;
		linuxs = 0;
		$('.w_5').text('关注');
	}
})

$('.css').click(function(){
	if (css == false) {
		$(this).css('opacity','0.3');
		css = true;
		csss = 6;
		$('.w_6').text('已关注');
	}else {
		$(this).css('opacity','1');
		css = false;
		csss = 0;
		$('.w_6').text('关注');
	}
})


$('.bootstrap').click(function(){
	if (bootstrap == false) {
		$(this).css('opacity','0.3');
		bootstrap = true;
		bootstraps = 7;
		$('.w_7').text('已关注');
	}else {
		$(this).css('opacity','1');
		bootstrap = false;
		bootstraps = 0;
		$('.w_7').text('关注');
	}
})

$('.laravel').click(function(){
	if (laravel == false) {
		$(this).css('opacity','0.3');
		laravel = true;
		laravels = 8;
		$('.w_8').text('已关注');
	}else {
		$(this).css('opacity','1');
		laravel = false;
		laravels = 0;
		$('.w_8').text('关注');
	}
})
$('.jinru_zh').click(function(){
	if (php|html5|js|apache|linux|css|bootstrap|laravel) {
		$.get('load/ajax',{php:phps,html5:html5s,js:jss,apache:apaches,linux:linuxs,css:csss,bootstrap:bootstraps,laravel:laravels},function(data){
			if (data==1) {

				window.location.href="index";
			} else{
				alert('关注失败');
			}
		})
		// window.location.href="index";
	}else{
		alert('你好,请先关注');
	}
})


